#ifndef RenderTargetBinding_h
#define RenderTargetBinding_h

#include <Defines.h>
#include <CSharpPropertyMethods.h>

// Riccsson includes.
#include <System/Object.h>
#include <System/Type.h>
#include <System/String.h>

// XNA includes.
#include "States/SamplerState.h"
#include "Texture.h"
#include "RenderTarget2D.h"
#include "CubeMapFace.h"
//#include "RenderTargetCube.h"

namespace Riccsson
{
	namespace Xna
	{
		namespace Framework
		{
			namespace Graphics
			{
				class RenderTargetCube{};

				// http://msdn.microsoft.com/en-us/library/ff434403.aspx
				struct RenderTargetBinding
				{
					private: GC_PTR<Texture> _renderTarget;
					private: CubeMapFace _cubeMapFace;

					PROP3(RenderTargetBinding, GC_PTR<Texture>, RenderTarget)
					PROP3(RenderTargetBinding, CubeMapFace, cubeMapFace)
					
					COPY_CONSTRUCTOR(RenderTargetBinding)
					{
						PROP3_INIT_COPY(RenderTargetBinding, GC_PTR<Texture>, RenderTarget);
						PROP3_INIT_COPY(RenderTargetBinding, CubeMapFace, cubeMapFace);
					}

					public: PROP3_GET(GC_PTR<Texture>, RenderTarget)
					{
						return _renderTarget;
					}
					private: PROP3_SET(GC_PTR<Texture>, RenderTarget){throw;}

					public: PROP3_GET(CubeMapFace, cubeMapFace)
					{
						return _cubeMapFace;
					}
					private: PROP3_SET(CubeMapFace, cubeMapFace){throw;}

					public: RenderTargetBinding()
						: PROP3_INIT(RenderTargetBinding, RenderTarget)
						, PROP3_INIT(RenderTargetBinding, cubeMapFace)
					{
					}

					public: RenderTargetBinding(GC_PTR<RenderTarget2D> renderTarget)
						: PROP3_INIT(RenderTargetBinding, RenderTarget)
						, PROP3_INIT(RenderTargetBinding, cubeMapFace)
					{
					}

					public: RenderTargetBinding(GC_PTR<RenderTargetCube> renderTarget, CubeMapFace cubeMapFace)
						: PROP3_INIT(RenderTargetBinding, RenderTarget)
						, PROP3_INIT(RenderTargetBinding, cubeMapFace)
					{
					}

					//public: static /*implicit*/ operator RenderTargetBinding(GC_PTR<RenderTarget2D> renderTarget)
					//{
					//	return new RenderTargetBinding(renderTarget);
					//}
				};

				bool operator ==(const RenderTargetBinding& left, const RenderTargetBinding& right);
				bool operator !=(const RenderTargetBinding& left, const RenderTargetBinding& right);
			}
		}
	}
}

#endif
